@model Adams.Admin.DataTransfer.Businesses.Create.PageLoad
@{
    Layout = "~/Views/Businesses/_Layout.cshtml";
}
<div class="content-box">
    <!-- Start Content Box -->
    <div class="content-box-header">
        <h3>
            Classified Details</h3>
    </div>
    <!-- End .content-box-header -->
    <div class="content-box-content">
        <form action="" method="post">
        <p>
            <label>
                Category</label>
            <select id="TypeID">
                <option value="">Choose Type...</option>
                @foreach (var typ in Model.Types)
                {
                    <option value="@typ.ID" @(Model.Business.ID > 0 && Model.Business.Category.Type.ID == typ.ID ? "selected" : "")>@typ.Name</option>
                }
            </select>
            <select id="CategoryID">
                <option value="">Choose Category...</option>
                @foreach (var cat in Model.Categories)
                {
                    <option value="@cat.ID" @(Model.Business.ID > 0 && Model.Business.Category.ID == cat.ID ? "selected" : "")>@cat.Name</option>
                }
            </select>
            <br />
            <small></small>
        </p>
        <p>
            <label>
                Status</label>
            <input name="Status" type="radio" value="1" @(Model.Business.Status == Adams.Shared.Entities.Businesses.Status.PendingApproval ? "checked" : "") />Pending
            <input name="Status" type="radio" value="2" @(Model.Business.Status == Adams.Shared.Entities.Businesses.Status.Approved || Model.Business.ID == 0 ? "checked" : "") />Approved
            <input name="Status" type="radio" value="3" @(Model.Business.Status == Adams.Shared.Entities.Businesses.Status.Rejected ? "checked" : "") />Rejected
            <input name="Status" type="radio" value="4" @(Model.Business.Status == Adams.Shared.Entities.Businesses.Status.Expired ? "checked" : "") />Expired
            <br />
            <small></small>
        </p>
        <p>
            <label>
                Member</label>
            <input class="text-input medium-input" type="text" id="Member" value="@(Model.Business.ID > 0 ? Model.Business.Member.FirstName + " " + Model.Business.Member.LastName + " (" + Model.Business.Member.Email + ")" : "")" />
            <input type="hidden" id="MemberID" value="@(Model.Business.ID > 0 ? Model.Business.Member.ID.ToString() : "")" />
            <br />
            <small></small>
        </p>
        <p>
            <label>
                Name</label>
            <input class="text-input medium-input" type="text" id="Name" value="@Model.Business.Name" />
            <br />
            <small>the title of the Business</small>
        </p>
        <p>
            <label>
                Street</label>
            <input class="text-input medium-input" type="text" id="Street" value="@Model.Business.Street" />
            <br />
            <small></small>
        </p>
        <p>
            <label>
                Street2</label>
            <input class="text-input medium-input" type="text" id="Street2" value="@Model.Business.Street2" />
            <br />
            <small></small>
        </p>
        <p>
            <label>
                City</label>
            <input class="text-input medium-input" type="text" id="City" value="@Model.Business.City" />
            <br />
            <small></small>
        </p>
        <p>
            <label>
                State</label>
            <input class="text-input medium-input" type="text" id="State" value="@Model.Business.State" />
            <br />
            <small></small>
        </p>
        <p>
            <label>
                Zip</label>
            <input class="text-input tiny-input" type="text" id="Zip" value="@Model.Business.Zip" />
            <br />
            <small></small>
        </p>
        <p>
            <label>
                Phone</label>
            <input class="text-input small-input" type="text" id="Phone" value="@Model.Business.Phone" />
            <br />
            <small></small>
        </p>
        <p>
            <label>
                ExpiresOn</label>
            <input class="text-input tiny-input datepicker" type="text" id="ExpiresOn" value="@(Model.Business.ID > 0 ? Model.Business.ExpiresOn.ToShortDateString() : DateTime.Now.AddYears(1).ToShortDateString())" />
            <br />
            <small>@(Model.Business.ID > 0 ? "Created on " + Model.Business.CreatedOn.ToShortDateString() : "")</small>
        </p>
        <p>
            <label>
                Description</label>
            <textarea class="text-input textarea" id="Description" cols="79" rows="15">@Model.Business.Description</textarea>
        </p>
        <p>
            <input class="button" id="submit" type="button" value="Submit" />
        </p>
        <div class="clear">
        </div>
        <!-- End .clear -->
        <input id="id" type="hidden" value="@Model.Business.ID" />
        </form>
    </div>
    <!-- End .content-box-content -->
</div>
<!-- End .content-box -->
@section Scripts {
    <script type="text/javascript" src="@Url.Content("/Scripts/Businesses/create.js")"></script>
}
